#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: db_info_v124.py 
@version:
@time: 2022/05/11 
"""
source = 'source'
target = 'target'
source_and_target = 'source_and_target'

source_db = 'source'
target_db = 'target'
source_and_target_db = 'source_and_target'

__all__ = [
    'Mysql',
    'Oracle',
    'MongoDB',
    'DB2',
    'Postgres',
    'Sqlserver',
    'Gbase8s',
    'Sybase',
    'GaussDB200',
    'ES',
    'Redis',
    'Kafka',
    'MariaDB',
    'MysqlPXC',
    'Jira',
    'DM',
    'Hive',
    'TCPIP',
    'MQ',
    'HBase',
    'KUDU',
    'Greenplum',
    'HANA',
    'GridFS',
    'File',
    'Dummy',
    'CustomConnection'
]


class Mysql:
    database_type = 'mysql'

    # 5562
    AUTO_MYSQL_5562_SOURCE = {
        "name": "AUTO_MYSQL_5562_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33061",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source,
    }
    AUTO_MYSQL_5562_TARGET = {
        "name": "AUTO_MYSQL_5562_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33061",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": target,
    }
    AUTO_MYSQL_5562_SOURCE_AND_TARGET = {
        "name": "AUTO_MYSQL_5562_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33061",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target,
    }

    # 5651
    AUTO_MYSQL_5651_SOURCE = {
        "name": "AUTO_MYSQL_5651_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33062",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source
    }
    AUTO_MYSQL_5651_TARGET = {
        "name": "AUTO_MYSQL_5651_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33062",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": target
    }
    AUTO_MYSQL_5651_SOURCE_AND_TARGET = {
        "name": "AUTO_MYSQL_5651_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33062",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target
    }

    # 5733
    AUTO_MYSQL_5733_SOURCE = {
        "name": "AUTO_MYSQL_5733_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33063",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source
    }
    AUTO_MYSQL_5733_TARGET = {
        "name": "AUTO_MYSQL_5733_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33063",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": target
    }
    AUTO_MYSQL_5733_SOURCE_AND_TARGET = {
        "name": "AUTO_MYSQL_5733_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33063",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target
    }

    # 8023
    AUTO_MYSQL_8023_SOURCE = {
        "name": "AUTO_MYSQL_8023_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33064",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source
    }
    AUTO_MYSQL_8023_TARGET = {
        "name": "AUTO_MYSQL_8023_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33064",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": target
    }
    AUTO_MYSQL_8023_SOURCE_AND_TARGET = {
        "name": "AUTO_MYSQL_8023_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "33064",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target
    }

    ALL = [
        AUTO_MYSQL_5562_SOURCE,
        AUTO_MYSQL_5651_SOURCE,
        AUTO_MYSQL_5733_SOURCE,
        AUTO_MYSQL_8023_SOURCE,
    ]


class Oracle:
    database_type = 'oracle'
    others = {
        "tin_type": "SID",
        "thin_type": "SID",
        "database_datetype_without_timezone": "+00:00",
    }

    AUTO_ORACLE_11g_SOURCE = {
        "name": "AUTO_ORACLE_11g_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.126",
        "database_port": "1521",
        "database_name": "tap11g",
        "database_owner": "USERQ",
        "database_username": "USERQ",
        "plain_password": "PlanQsuccesS!",
        "connection_type": source,
        **others
    }
    AUTO_ORACLE_11g_TARGET = {}
    AUTO_ORACLE_11g_SOURCE_AND_TARGET = {}

    AUTO_ORACLE_12c_SOURCE = {
        "name": "AUTO_ORACLE_12c_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.126",
        "database_port": "1521",
        "database_name": "tap122c",
        "database_owner": "TAPDATA",
        "database_username": "TAPDATA",
        "plain_password": "Gotapd8!",
        "connection_type": source,
        **others
    }
    AUTO_ORACLE_12c_TARGET = {}
    AUTO_ORACLE_12c_SOURCE_AND_TARGET = {}

    AUTO_ORACLE_19c_SOURCE = {
        "name": "AUTO_ORACLE_19c_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.126",
        "database_port": "1521",
        "database_name": "tap19c",
        "database_owner": "TAPDATA",
        "database_username": "TAPDATA",
        "plain_password": "Gotapd8!",
        "database_password": "582d5cb45f75be4f670192ac1aabeec2",
        "connection_type": source,
        **others
    }
    AUTO_ORACLE_19c_TARGET = {}
    AUTO_ORACLE_19c_SOURCE_AND_TARGET = {}

    # 132
    AUTO_ORACLE_132_SOURCE = {
        "name": "AUTO_ORACLE_132_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.132",
        "database_port": "1521",
        "database_name": "tap11g132",
        "database_owner": "TAPDATA",
        "database_username": "tapdata",
        "plain_password": "Gotapd8!",
        "connection_type": source,
        **others
    }
    AUTO_ORACLE_132_TARGET = {}
    AUTO_ORACLE_132_SOURCE_AND_TARGET = {}

    # 189
    AUTO_ORACLE_niko_SOURCE = {}
    AUTO_ORACLE_niko_TARGET = {
        "name": "AUTO_ORACLE_niko_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.189",
        "database_port": "15212",
        "database_name": "ORCLCDB",
        "database_owner": "C##ZHANGXIN",
        "database_username": "c##zhangxin",
        "plain_password": "tapdata",
        "connection_type": source,
        **others
    }
    AUTO_ORACLE_niko_SOURCE_AND_TARGET = {}


class MongoDB:
    database_type = 'mongodb'

    # 3221
    AUTO_MONGODB_3221_SOURCE = {
        "name": "AUTO_MONGODB_3221_SOURCE",
        "additionalString": "authSource=admin",
        "database_type": database_type,
        "database_host": "192.168.1.183:23221",
        "database_port": "23221",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source
    }
    AUTO_MONGODB_3221_TARGET = {
        "name": "AUTO_MONGODB_3221_TARGET",
        "additionalString": "authSource=admin",
        "database_type": database_type,
        "database_host": "192.168.1.183:23221",
        "database_port": "23221",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": target
    }
    AUTO_MONGODB_3221_SOURCE_AND_TARGET = {
        "name": "AUTO_MONGODB_3221_SOURCE_AND_TARGET",
        "additionalString": "authSource=admin",
        "database_type": database_type,
        "database_host": "192.168.1.183:23221",
        "database_port": "23221",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target
    }

    # 3424
    AUTO_MONGODB_3424_SOURCE = {
        "name": "AUTO_MONGODB_3424_SOURCE",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:23424",
        "database_port": "23424",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source
    }
    AUTO_MONGODB_3424_TARGET = {
        "name": "AUTO_MONGODB_3424_TARGET",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:23424",
        "database_port": "23424",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": target
    }
    AUTO_MONGODB_3424_SOURCE_AND_TARGET = {
        "name": "AUTO_MONGODB_3424_SOURCE_AND_TARGET",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:23424",
        "database_port": "23424",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target
    }

    # 3622
    AUTO_MONGODB_3622_SOURCE = {
        "name": "AUTO_MONGODB_3622_SOURCE",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:23622",
        "database_port": "23622",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source
    }
    AUTO_MONGODB_3622_TARGET = {
        "name": "AUTO_MONGODB_3622_TARGET",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:23622",
        "database_port": "23622",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": target
    }
    AUTO_MONGODB_3622_SOURCE_AND_TARGET = {
        "name": "AUTO_MONGODB_3622_SOURCE_AND_TARGET",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:23622",
        "database_port": "23622",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target
    }

    # 4023
    AUTO_MONGODB_4023_SOURCE = {
        "name": "AUTO_MONGODB_4023_SOURCE",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:24023",
        "database_port": "24023",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source
    }
    AUTO_MONGODB_4023_TARGET = {
        "name": "AUTO_MONGODB_4023_TARGET",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:24023",
        "database_port": "24023",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": target
    }
    AUTO_MONGODB_4023_SOURCE_AND_TARGET = {
        "name": "AUTO_MONGODB_4023_SOURCE_AND_TARGET",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:24023",
        "database_port": "24023",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target
    }

    # 4212
    AUTO_MONGODB_4212_SOURCE = {
        "name": "AUTO_MONGODB_4212_SOURCE",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:24212",
        "database_port": "24212",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source
    }
    AUTO_MONGODB_4212_TARGET = {
        "name": "AUTO_MONGODB_4212_TARGET",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:24212",
        "database_port": "24212",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": target
    }
    AUTO_MONGODB_4212_SOURCE_AND_TARGET = {
        "name": "AUTO_MONGODB_4212_SOURCE_AND_TARGET",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:24212",
        "database_port": "24212",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target
    }

    ALL = [
        AUTO_MONGODB_3221_SOURCE,
        AUTO_MONGODB_3221_TARGET,
        AUTO_MONGODB_3221_SOURCE_AND_TARGET,
        AUTO_MONGODB_3424_SOURCE,
        AUTO_MONGODB_3424_TARGET,
        AUTO_MONGODB_3424_SOURCE_AND_TARGET,
        AUTO_MONGODB_3622_SOURCE,
        AUTO_MONGODB_3622_TARGET,
        AUTO_MONGODB_3622_SOURCE_AND_TARGET,
        AUTO_MONGODB_4023_SOURCE,
        AUTO_MONGODB_4023_TARGET,
        AUTO_MONGODB_4023_SOURCE_AND_TARGET,
        AUTO_MONGODB_4212_SOURCE,
        AUTO_MONGODB_4212_TARGET,
        AUTO_MONGODB_4212_SOURCE_AND_TARGET
    ]


class DB2:
    database_type = 'db2'

    AUTO_DB2_132_SOURCE = {
        "name": "AUTO_DB2_132_SOURCE",
        "database_type": database_type,
        "connection_type": source,
        "database_host": "192.168.1.132",
        "database_port": "50000",
        "database_name": "TESTDB",
        "database_username": "db2inst1",
        "plain_password": "admin",
        "database_owner": source_db.upper(),
        "node_name": "catalog01"
    }


class Postgres:
    database_type = "postgres"
    others = {
        "thin_type": "SID",
        "pgsql_log_decorder_plugin_name": "wal2json_streaming",
        "additionalString": "autosave=always&cleanupSavePoints=ture",
    }

    # 9426
    AUTO_POSTGRES_9426_SOURCE = {
        "name": "AUTO_POSTGRES_9426_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "15432",
        "database_name": source_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source,
        **others
    }
    AUTO_POSTGRES_9426_TARGET = {
        "name": "AUTO_POSTGRES_9426_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "15432",
        "database_name": target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target,
        **others
    }
    AUTO_POSTGRES_9426_SOURCE_AND_TARGET = {
        "name": "AUTO_POSTGRES_9426_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "15432",
        "database_name": source_and_target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target,
        **others
    }
    # 9525
    AUTO_POSTGRES_9525_SOURCE = {
        "name": "AUTO_POSTGRES_9525_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5433",
        "database_name": source_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source,
        **others
    }
    AUTO_POSTGRES_9525_TARGET = {
        "name": "AUTO_POSTGRES_9525_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5433",
        "database_name": target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target,
        **others
    }
    AUTO_POSTGRES_9525_SOURCE_AND_TARGET = {
        "name": "AUTO_POSTGRES_9525_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5433",
        "database_name": source_and_target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target,
        **others
    }
    # 9621
    AUTO_POSTGRES_9621_SOURCE = {
        "name": "AUTO_POSTGRES_9621_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5434",
        "database_name": source_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source,
        **others
    }
    AUTO_POSTGRES_9621_TARGET = {
        "name": "AUTO_POSTGRES_9621_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5434",
        "database_name": target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target,
        **others
    }
    AUTO_POSTGRES_9621_SOURCE_AND_TARGET = {
        "name": "AUTO_POSTGRES_9621_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5434",
        "database_name": source_and_target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target,
        **others
    }
    # 1016
    AUTO_POSTGRES_1016_SOURCE = {
        "name": "AUTO_POSTGRES_9621_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5435",
        "database_name": source_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source,
        **others
    }
    AUTO_POSTGRES_1016_TARGET = {
        "name": "AUTO_POSTGRES_1016_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5435",
        "database_name": target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target,
        **others
    }
    AUTO_POSTGRES_1016_SOURCE_AND_TARGET = {
        "name": "AUTO_POSTGRES_1016_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5435",
        "database_name": source_and_target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target,
        **others
    }
    # 1111
    AUTO_POSTGRES_1111_SOURCE = {
        "name": "AUTO_POSTGRES_1111_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5436",
        "database_name": source_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source,
        **others
    }
    AUTO_POSTGRES_1111_TARGET = {
        "name": "AUTO_POSTGRES_1111_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5436",
        "database_name": target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target,
        **others
    }
    AUTO_POSTGRES_1111_SOURCE_AND_TARGET = {
        "name": "AUTO_POSTGRES_1111_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5436",
        "database_name": source_and_target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target,
        **others
    }
    # 1206
    AUTO_POSTGRES_1206_SOURCE = {
        "name": "AUTO_POSTGRES_1206_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5437",
        "database_name": source_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source,
        **others
    }
    AUTO_POSTGRES_1206_TARGET = {
        "name": "AUTO_POSTGRES_1206_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5437",
        "database_name": target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target,
        **others
    }
    AUTO_POSTGRES_1206_SOURCE_AND_TARGET = {
        "name": "AUTO_POSTGRES_1206_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5437",
        "database_name": source_and_target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target,
        **others
    }
    # 1302
    AUTO_POSTGRES_1302_SOURCE = {
        "name": "AUTO_POSTGRES_1302_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5438",
        "database_name": source_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source,
        **others
    }
    AUTO_POSTGRES_1302_TARGET = {
        "name": "AUTO_POSTGRES_1302_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5438",
        "database_name": target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target,
        **others
    }
    AUTO_POSTGRES_1302_SOURCE_AND_TARGET = {
        "name": "AUTO_POSTGRES_1302_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5438",
        "database_name": source_and_target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target,
        **others
    }

    # ALL
    ALL = [
        AUTO_POSTGRES_9426_SOURCE,
        AUTO_POSTGRES_9426_TARGET,
        AUTO_POSTGRES_9426_SOURCE_AND_TARGET,
        AUTO_POSTGRES_9525_SOURCE,
        AUTO_POSTGRES_9525_TARGET,
        AUTO_POSTGRES_9525_SOURCE_AND_TARGET,
        AUTO_POSTGRES_9621_SOURCE,
        AUTO_POSTGRES_9621_TARGET,
        AUTO_POSTGRES_9621_SOURCE_AND_TARGET,
        AUTO_POSTGRES_1016_SOURCE,
        AUTO_POSTGRES_1016_TARGET,
        AUTO_POSTGRES_1016_SOURCE_AND_TARGET,
        AUTO_POSTGRES_1111_SOURCE,
        AUTO_POSTGRES_1111_TARGET,
        AUTO_POSTGRES_1111_SOURCE_AND_TARGET,
        AUTO_POSTGRES_1206_SOURCE,
        AUTO_POSTGRES_1206_TARGET,
        AUTO_POSTGRES_1206_SOURCE_AND_TARGET,
        AUTO_POSTGRES_1302_SOURCE,
        AUTO_POSTGRES_1302_TARGET,
        AUTO_POSTGRES_1302_SOURCE_AND_TARGET,
    ]


class Sqlserver:
    database_type = "sqlserver"

    AUTO_SQLSERVER_2017_SOURCE = {
        "name": "AUTO_SQLSERVER_2017_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "11433",
        "database_name": source_db,
        "database_owner": "dbo",
        "database_username": "sa",
        "plain_password": "Gotapd8-",
        "connection_type": source
    }
    AUTO_SQLSERVER_2017_TARGET = {
        "name": "AUTO_SQLSERVER_2017_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "11433",
        "database_name": target_db,
        "database_owner": "dbo",
        "database_username": "sa",
        "plain_password": "Gotapd8-",
        "connection_type": target
    }
    AUTO_SQLSERVER_2017_SOURCE_AND_TARGET = {
        "name": "AUTO_SQLSERVER_2017_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "11433",
        "database_name": source_and_target_db,
        "database_owner": "dbo",
        "database_username": "sa",
        "plain_password": "Gotapd8-",
        "connection_type": source_and_target
    }

    AUTO_SQLSERVER_2019_SOURCE = {
        "name": "AUTO_SQLSERVER_2019_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "11434",
        "database_name": source_db,
        "database_owner": "dbo",
        "database_username": "sa",
        "plain_password": "Gotapd8-",
        "connection_type": source
    }
    AUTO_SQLSERVER_2019_TARGET = {
        "name": "AUTO_SQLSERVER_2019_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "11434",
        "database_name": target_db,
        "database_owner": "dbo",
        "database_username": "sa",
        "plain_password": "Gotapd8-",
        "connection_type": target
    }
    AUTO_SQLSERVER_2019_SOURCE_AND_TARGET = {
        "name": "AUTO_SQLSERVER_2019_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "11434",
        "database_name": source_and_target_db,
        "database_owner": "dbo",
        "database_username": "sa",
        "plain_password": "Gotapd8-",
        "connection_type": source_and_target
    }

    ALL = [
        AUTO_SQLSERVER_2017_SOURCE,
        AUTO_SQLSERVER_2017_TARGET,
        AUTO_SQLSERVER_2017_SOURCE_AND_TARGET,
        AUTO_SQLSERVER_2019_SOURCE,
        AUTO_SQLSERVER_2019_TARGET,
        AUTO_SQLSERVER_2019_SOURCE_AND_TARGET
    ]


class Gbase8s:
    # use mysql api
    database_type = "gbase-8s"

    AUTO_GBASE_SOURCE = {
        "name": "AUTO_GBASE_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5258",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "root",
        "connection_type": source
    }


class Sybase:
    is_null = True
    database_type = "sybase ase"

    AUTO_SYBASE_SOURCE = {
        "name": "AUTO_SYBASE_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5000",
        "database_name": source_db,
        "database_owner": 'source',
        "database_username": "source",
        "plain_password": "source",
        "connection_type": source
    }
    AUTO_SYBASE_TARGET = {
        "name": "AUTO_SYBASE_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5000",
        "database_name": target_db,
        "database_owner": "target",
        "database_username": "target",
        "plain_password": "target",
        "connection_type": target
    }
    AUTO_SYBASE_SOURCE_AND_TARGET = {
        "name": "AUTO_SYBASE_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "5000",
        "database_name": source_and_target_db,
        "database_owner": "source_and_target",
        "database_username": "source_and_target",
        "plain_password": "source_and_target",
        "connection_type": source_and_target
    }


class GaussDB200:
    database_type = 'gaussdb200'

    AUTO_GAUSSDB_SOURCE = {
        'name': 'AUTO_GAUSSDB_SOURCE',
        'connection_type': source,
        'database_host': '192.168.1.183',
        'database_port': '15437',
        'database_type': database_type,
        'database_name': source_db,
        'database_owner': "public",
        'database_username': "gaussdb",
        "plain_password": "Gotapd8@"
    }
    AUTO_GAUSSDB_TARGET = {
        'name': 'AUTO_GAUSSDB_TARGET',
        'connection_type': target,
        'database_host': '192.168.1.183',
        'database_port': '15437',
        'database_type': database_type,
        'database_name': target_db,
        'database_owner': "public",
        'database_username': "gaussdb",
        "plain_password": "Gotapd8@"
    }
    AUTO_GAUSSDB_SOURCE_AND_TARGET = {
        'name': 'AUTO_GAUSSDB_SOURCE_AND_TARGET',
        'connection_type': source_and_target,
        'database_host': '192.168.1.183',
        'database_port': '15437',
        'database_type': database_type,
        'database_name': source_and_target_db,
        'database_owner': "public",
        'database_username': "gaussdb",
        "plain_password": "Gotapd8@"
    }


class ES:
    database_type = "elasticsearch"

    AUTO_ES_189_TARGET_WITHOUT_AUTHENTICATION = {
        "name": "AUTO_ES_189_TARGET",
        "database_type": database_type,
        "connection_type": target,
        "database_host": "192.168.1.189",
        "database_port": "9204",
        "database_name": "",
        "database_username": "",
        "database_password": "",
        "plain_password": "",
    }
    AUTO_ES_183_TARGET_WITH_AUTHENTICATION = {
        "name": "ES_SOURCE_TEST",
        "database_type": database_type,
        "connection_type": target,
        "database_host": "192.168.1.183",
        "database_port": "9200",
        "database_name": "",
        "database_username": "elastic",
        "database_password": "",
        "plain_password": "123456",
    }

    ALL = [
        AUTO_ES_183_TARGET_WITH_AUTHENTICATION,
        AUTO_ES_189_TARGET_WITHOUT_AUTHENTICATION
    ]


class Redis:
    database_type = 'redis'

    AUTO_REDIS_00_TARGET = {
        'name': 'AUTO_REDIS_00_TARGET',
        'database_type': database_type,
        "database_host": "192.168.1.183",
        "database_port": "16379",
        "database_name": "0",
        "database_username": "",
        "database_password": "",
        "plain_password": "",
        "database_owner": "",
        "connection_type": target,
    }
    AUTO_REDIS_01_TARGET = {
        'name': 'AUTO_REDIS_00_TARGET',
        'database_type': database_type,
        "database_host": "192.168.1.183",
        "database_port": "16379",
        "database_name": "1",
        "database_username": "",
        "database_password": "",
        "plain_password": "",
        "database_owner": "",
        "connection_type": target,
    }


class Kafka:
    database_type = "kafka"

    AUTO_KAFKA_9092_SOURCE = {
        "name": "AUTO_KAFKA_9092_SOURCE",
        "database_type": "kafka",
        "kafkaBootstrapServers": "192.168.1.183:9092",
        "connection_type": source,
        "kafkaPatternTopics": ".",
        "database_username": "",
        "database_password": "",
        "plain_password": "",
    }
    AUTO_KAFKA_9093_TARGET = {
        "name": "AUTO_KAFKA_9093_SOURCE",
        "database_type": "kafka",
        "kafkaBootstrapServers": "192.168.1.183:9093",
        "connection_type": source,
        "kafkaPatternTopics": ".",
        "database_username": "",
        "database_password": "",
        "plain_password": "",
    }


class MariaDB:
    database_type = "mariadb"

    # 5564
    AUTO_MARIADB_5564_SOURCE = {
        "name": "AUTO_MARIADB_5564_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "43061",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source
    }
    AUTO_MARIADB_5564_TARGET = {
        "name": "AUTO_MARIADB_5564_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "43061",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target
    }
    AUTO_MARIADB_5564_SOURCE_AND_TARGET = {
        "name": "AUTO_MARIADB_5564_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "43061",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target
    }

    # 10418
    AUTO_MARIADB_10418_SOURCE = {
        "name": "AUTO_MARIADB_10418_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "43062",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source
    }
    AUTO_MARIADB_10418_TARGET = {
        "name": "AUTO_MARIADB_10418_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "43062",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target
    }
    AUTO_MARIADB_10418_SOURCE_AND_TARGET = {
        "name": "AUTO_MARIADB_10418_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "43062",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target
    }
    # 10509
    AUTO_MARIADB_10509_SOURCE = {
        "name": "AUTO_MARIADB_10509_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "43063",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source
    }
    AUTO_MARIADB_10509_TARGET = {
        "name": "AUTO_MARIADB_10509_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "43063",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target
    }
    AUTO_MARIADB_10509_SOURCE_AND_TARGET = {
        "name": "AUTO_MARIADB_10509_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "43063",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target
    }

    ALL = [
        AUTO_MARIADB_5564_SOURCE,
        AUTO_MARIADB_5564_TARGET,
        AUTO_MARIADB_5564_SOURCE_AND_TARGET,
        AUTO_MARIADB_10418_SOURCE,
        AUTO_MARIADB_10418_TARGET,
        AUTO_MARIADB_10418_SOURCE_AND_TARGET,
        AUTO_MARIADB_10509_SOURCE,
        AUTO_MARIADB_10509_TARGET,
        AUTO_MARIADB_10509_SOURCE_AND_TARGET
    ]


class MysqlPXC:
    is_null = True


class Jira:
    is_null = True


class DM:
    database_type = "dameng"
    AUTO_DM_TARGET = {
        "name": "AUTO_DM_SOURCE",
        "database_type": database_type,
        "connection_type": target,
        "database_host": "192.168.1.183",
        "database_port": "52360",
        "database_name": target_db.upper(),
        "database_owner": target_db.upper(),
        "database_username": "sysdba",
        "plain_password": "Gotapd8!",
    }


class Hive:
    database_type = "hive"

    # slow
    AUTO_HIVE_JDBC_TARGET = {
        'name': 'AUTO_HIVE_JDBC_TARGET',
        'database_type': database_type,
        'connection_type': target,
        'database_host': '192.168.1.179',
        'database_port': '10000',
        'python_port': '10000',
        'database_name': target_db,
        'hiveConnType': 'JDBC'
    }

    # fast， but not support update, delete cdc event
    AUTO_HIVE_STREAM_TARGET = {
        'name': 'AUTO_HIVE_STREAM_TARGET',
        'database_type': database_type,
        'connection_type': target,
        'database_host': '192.168.1.179',
        'database_port': '9083',
        'python_port': '10000',
        'database_name': target_db + '_stream',
        'hiveConnType': 'Stream'
    }


class TCPIP:
    is_null = True


class MQ:
    database_type = 'mq'

    # queue
    AUTO_ACTIVEMQ_QUEUE_SOURCE = {
        "name": "AUTO_ACTIVEMQ_QUEUE_SOURCE",
        'database_type': database_type,
        'connection_type': source,
        'mqType': '0',
        'brokerURL': 'tcp://192.168.1.183:61616',
        'pythonURL': 'tcp://192.168.1.183:61613',
        'mqUserName': 'admin',
        'mqPassword': 'admin',
        "mqQueueSet": [source_db],
        "mqTopicSet": [],
        "isUrl": True,
    }
    AUTO_ACTIVEMQ_QUEUE_TARGET = {
        "name": "AUTO_ACTIVEMQ_QUEUE_TARGET",
        'database_type': database_type,
        'connection_type': target,
        'mqType': '0',
        'brokerURL': 'tcp://192.168.1.183:61616',
        'pythonURL': 'tcp://192.168.1.183:61613',
        'mqUserName': 'admin',
        'mqPassword': 'admin',
        "mqQueueSet": [target_db],
        "mqTopicSet": [],
        "isUrl": True,
    }
    AUTO_ACTIVEMQ_QUEUE_SOURCE_AND_TARGET = {
        "name": "AUTO_ACTIVEMQ_QUEUE_SOURCE_AND_TARGET",
        'database_type': database_type,
        'connection_type': source_and_target,
        'mqType': '0',
        'brokerURL': 'tcp://192.168.1.183:61616',
        'pythonURL': 'tcp://192.168.1.183:61613',
        'mqUserName': 'admin',
        'mqPassword': 'admin',
        "mqQueueSet": [source_and_target_db],
        "mqTopicSet": [],
        "isUrl": True,
    }
    # topic 需要先打开消费者，再打开生产者才能获取数据
    AUTO_ACTIVEMQ_TOPIC_SOURCE = {
        "name": "AUTO_ACTIVEMQ_TOPIC_SOURCE",
        'database_type': database_type,
        'connection_type': source,
        'mqType': '0',
        'brokerURL': 'tcp://192.168.1.183:61616',
        'pythonURL': 'tcp://192.168.1.183:61613',
        'mqUserName': 'admin',
        'mqPassword': 'admin',
        "mqQueueSet": [],
        "mqTopicSet": [source_db],
        "isUrl": True,
    }
    AUTO_ACTIVEMQ_TOPIC_TARGET = {
        "name": "AUTO_ACTIVEMQ_TOPIC_TARGET",
        'database_type': database_type,
        'connection_type': source,
        'mqType': '0',
        'brokerURL': 'tcp://192.168.1.183:61616',
        'pythonURL': 'tcp://192.168.1.183:61613',
        'mqUserName': 'admin',
        'mqPassword': 'admin',
        "mqQueueSet": [],
        "mqTopicSet": [target_db],
        "isUrl": True,
    }
    AUTO_ACTIVEMQ_TOPIC_SOURCE_AND_TARGET = {
        "name": "AUTO_ACTIVEMQ_TOPIC_SOURCE_AND_TARGET",
        'database_type': database_type,
        'connection_type': source,
        'mqType': '0',
        'brokerURL': 'tcp://192.168.1.183:61616',
        'pythonURL': 'tcp://192.168.1.183:61613',
        'mqUserName': 'admin',
        'mqPassword': 'admin',
        "mqQueueSet": [],
        "mqTopicSet": [source_and_target_db],
        "isUrl": True,
    }


class HBase:
    is_null = True


class KUDU:
    is_null = True


class Greenplum:
    database_type = "greenplum"

    AUTO_GREENPLUM_SOURCE = {
        "name": "AUTO_GREENPLUM_SOURCE",
        "database_type": database_type,
        "connection_type": source,
        "database_host": "192.168.1.183",
        "database_port": "26432",
        "database_name": source_db,
        "database_owner": "public",
        "database_username": "gpadmin",
        "database_password": "",
        "plain_password": "gpadmin",
    }
    AUTO_GREENPLUM_TARGET = {
        "name": "AUTO_GREENPLUM_TARGET",
        "database_type": database_type,
        "connection_type": target,
        "database_host": "192.168.1.183",
        "database_port": "26432",
        "database_name": target_db,
        "database_owner": "public",
        "database_username": "gpadmin",
        "database_password": "",
        "plain_password": "gpadmin",
    }
    AUTO_GREENPLUM_SOURCE_AND_TARGET = {
        "name": "AUTO_GREENPLUM_SOURCE_AND_TARGET",
        "database_type": database_type,
        "connection_type": source_and_target,
        "database_host": "192.168.1.183",
        "database_port": "26432",
        "database_name": source_and_target_db,
        "database_owner": "public",
        "database_username": "gpadmin",
        "database_password": "",
        "plain_password": "gpadmin",
    }


class HANA:
    database_type = 'hana'

    # SDC
    AUTO_HANA_SDC_SOURCE = {
        "name": "AUTO_HANA_SDC_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "39018",
        "database_name": source_db.upper(),
        "database_username": "SYSTEM",
        "plain_password": "Gotapd8!",
        "connection_type": source,
        'hanaType': "sdc",
    }
    AUTO_HANA_SDC_TARGET = {
        "name": "AUTO_HANA_SDC_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "39018",
        "database_name": target_db.upper(),
        "database_username": "SYSTEM",
        "plain_password": "Gotapd8!",
        "connection_type": target,
        'hanaType': "sdc",
    }
    AUTO_HANA_SDC_SOURCE_AND_TARGET = {
        "name": "AUTO_HANA_SDC_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "39018",
        "database_name": source_and_target_db.upper(),
        "database_username": "SYSTEM",
        "plain_password": "Gotapd8!",
        "connection_type": source_and_target,
        'hanaType': "sdc",
    }
    # MDC
    # hana_source_multi_tenant = {
    #     "name": "hana_source_multi_tenant",
    #     "database_type": database_type,
    #     "database_host": "192.168.1.128",
    #     "database_port": "39013",
    #     "database_name": "ZSJ",
    #     'database_owner': "SOURCE",
    #     "database_username": "SYSTEM",
    #     "plain_password": "dcCf4nL@",
    #     "connection_type": source_and_target,
    #     'hanaType': "mdc"
    # }


class GridFS:
    is_null = True


class File:
    is_null = True
    database_type = 'file'


class Dummy:
    database_type = 'dummy db'

    AUTO_DUMMY_SOURCE = {
        'name': 'AUTO_DUMMY_SOURCE',
        'database_type': database_type,
        "database_host": "",
        "database_port": "",
        "database_name": "",
        "database_username": "",
        "database_password": "",
        "plain_password": "",
        "database_owner": "",
        "connection_type": source,
    }
    AUTO_DUMMY_TARGET = {
        'name': 'AUTO_DUMMY_TARGET',
        'database_type': database_type,
        "database_host": "",
        "database_port": "",
        "database_name": "",
        "database_username": "",
        "database_password": "",
        "plain_password": "",
        "database_owner": "",
        "connection_type": target,
    }


class CustomConnection:
    is_null = True
